home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / RCS / gate.h,v < prev    next >
Encoding:
Text File  |  1992-06-05  |  3.3 KB  |  121 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     92.06.05.12.36.43;  author voelker;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     92.05.16.15.55.56;  author voelker;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Header file for the Gate_* library routines.
  22. @
  23.  
  24.  
  25. 1.2
  26. log
  27. @new gate library
  28. @
  29. text
  30. @/* 
  31.  * gate.h --
  32.  *
  33.  *    Header file for users of the Gate_ functions.  These
  34.  *      functions access a database of gateways for use with
  35.  *      communicating with Sprite hosts accross those gateways.
  36.  *
  37.  * Copyright 1992 Regents of the University of California
  38.  * Permission to use, copy, modify, and distribute this
  39.  * software and its documentation for any purpose and without
  40.  * fee is hereby granted, provided that the above copyright
  41.  * notice appear in all copies.  The University of California
  42.  * makes no representations about the suitability of this
  43.  * software for any purpose.  It is provided "as is" without
  44.  * express or implied warranty.
  45.  *
  46.  * "$Header: /sprite/src/lib/include/RCS/gate.h,v 1.1 92/05/16 15:55:56 voelker Exp Locker: voelker $"
  47.  */
  48.  
  49. #ifndef _GATE
  50. #define _GATE
  51.  
  52. #include "host.h"
  53.  
  54. /*
  55.  * A gateway information file contains listings of gateway definitions,
  56.  * one per line.  Each line has the form:
  57.  *
  58.  *     <descr> <netType> <netAddr> <inetAddr>
  59.  *
  60.  *
  61.  *      descr               One word description of the gateway.
  62.  *    netType         Type of local network by which the gateway is
  63.  *                      connected.  Currently, only `ether', `ultra',
  64.  *                      and `fddi' are understood.
  65.  *    netAddr              Address for the local network of the given type.
  66.  *    inetAddr          The internet address of the network interface
  67.  *                          of the host.
  68.  *
  69.  * When routes are installed to specific hosts on a machine, those routes
  70.  * need to know the net addresses (e.g., ethernet address) of those
  71.  * machines.  However, if the host is on another subnet, then the route
  72.  * should use the net address of the gateway to that subnet instead of
  73.  * the net address of the host.  The decision to route to the host
  74.  * directly or to a gateway is done at route installation time, based
  75.  * upon the internet address of the host.  The route installation
  76.  * routines use the gateway file to translate internet addresses of hosts
  77.  * on different subnets to net addresses to gateways to those hosts.
  78.  *
  79.  */
  80.  
  81. typedef struct Gate_Entry {
  82.     char              *desc;        /* Description of gateway */
  83.     Net_Address       netAddr;      /* Network address of the gateway */
  84.     Net_InetAddress   inetAddr;     /* Internet address mask for those network
  85.                      * interfaces that use this gateway */
  86. } Gate_Entry;
  87.  
  88. /*
  89.  * Accessor functions
  90.  */
  91. Gate_Entry *    Gate_ByInetAddr();    /* Find by Internet address */
  92. Gate_Entry *    Gate_ByDesc();        /* Find entry by name */
  93. Gate_Entry *    Gate_ByNetAddr();    /* Find by LAN address */
  94. void        Gate_End();        /* Close gate description file */
  95. Gate_Entry *    Gate_Next();        /* Retrieve next entry in file */
  96. int        Gate_SetFile();        /* Change file to read for info */
  97. int        Gate_Start();        /* Open gateway description file */
  98.  
  99.  
  100. #endif /* _GATE */
  101.  
  102.  
  103.  
  104. @
  105.  
  106.  
  107. 1.1
  108. log
  109. @Initial revision
  110. @
  111. text
  112. @d17 1
  113. a17 1
  114.  * "$Header: /user6/voelker/src/hosttest/RCS/gate.h,v 1.1 92/03/26 19:47:01 voelker Exp Locker: voelker $"
  115. a24 2
  116. #ifdef NEW_NET
  117.  
  118. a69 1
  119. #endif /* NEW_NET */
  120. @
  121.